﻿#ifndef HEROPLANE_H
#define HEROPLANE_H

#include "map.h"
#include "heroplane.h"
#include "enemyplane.h"
#include "bomb.h"

#include <QTimer>
#include <QWidget>

class MainScene : public QWidget
{
    Q_OBJECT

public:
    MainScene(QWidget *parent = nullptr);
    ~MainScene();

    void paintEvent(QPaintEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;

    void initScene();
    void playGame();
    void updatePostion();
    void enemyScene();
    void collisionDetection();

    EnemyPlane ememyScenes[ENEMY_NUM];
    Bomb bombs[BOMB_NUM];

private:
    QTimer m_timer;
    Map m_map;
    HeroPlane m_plane;

    int ememyShowCount;
};
#endif // HEROPLANE_H
